Integrand size = 14, antiderivative size = 76 \[ \int \frac {\cos ^2\left (a+b x^2\right )}{x^2} \, dx=-\frac {\cos ^2\left (a+b x^2\right )}{x}-\sqrt {b} \sqrt {\pi } \cos (2 a) \operatorname {FresnelS}\left (\frac {2 \sqrt {b} x}{\sqrt {\pi }}\right )-\sqrt {b} \sqrt {\pi } \operatorname {FresnelC}\left (\frac {2 \sqrt {b} x}{\sqrt {\pi }}\right ) \sin (2 a) \]
-cos(b*x^2+a)^2/x-cos(2*a)*FresnelS(2*x*b^(1/2)/Pi^(1/2))*b^(1/2)*Pi^(1/2) -FresnelC(2*x*b^(1/2)/Pi^(1/2))*sin(2*a)*b^(1/2)*Pi^(1/2)
Time = 0.18 (sec) , antiderivative size = 76, normalized size of antiderivative = 1.00 \[ \int \frac {\cos ^2\left (a+b x^2\right )}{x^2} \, dx=-\frac {\cos ^2\left (a+b x^2\right )+\sqrt {b} \sqrt {\pi } x \cos (2 a) \operatorname {FresnelS}\left (\frac {2 \sqrt {b} x}{\sqrt {\pi }}\right )+\sqrt {b} \sqrt {\pi } x \operatorname {FresnelC}\left (\frac {2 \sqrt {b} x}{\sqrt {\pi }}\right ) \sin (2 a)}{x} \]
-((Cos[a + b*x^2]^2 + Sqrt[b]*Sqrt[Pi]*x*Cos[2*a]*FresnelS[(2*Sqrt[b]*x)/S qrt[Pi]] + Sqrt[b]*Sqrt[Pi]*x*FresnelC[(2*Sqrt[b]*x)/Sqrt[Pi]]*Sin[2*a])/x )
Time = 0.38 (sec) , antiderivative size = 84, normalized size of antiderivative = 1.11, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.429, Rules used = {3875, 5084, 3854, 3834, 3832, 3833}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\cos ^2\left (a+b x^2\right )}{x^2} \, dx\) |
\(\Big \downarrow \) 3875 |
\(\displaystyle -4 b \int \cos \left (b x^2+a\right ) \sin \left (b x^2+a\right )dx-\frac {\cos ^2\left (a+b x^2\right )}{x}\) |
\(\Big \downarrow \) 5084 |
\(\displaystyle -2 b \int \sin \left (2 \left (b x^2+a\right )\right )dx-\frac {\cos ^2\left (a+b x^2\right )}{x}\) |
\(\Big \downarrow \) 3854 |
\(\displaystyle -2 b \int \sin \left (2 b x^2+2 a\right )dx-\frac {\cos ^2\left (a+b x^2\right )}{x}\) |
\(\Big \downarrow \) 3834 |
\(\displaystyle -2 b \left (\sin (2 a) \int \cos \left (2 b x^2\right )dx+\cos (2 a) \int \sin \left (2 b x^2\right )dx\right )-\frac {\cos ^2\left (a+b x^2\right )}{x}\) |
\(\Big \downarrow \) 3832 |
\(\displaystyle -2 b \left (\sin (2 a) \int \cos \left (2 b x^2\right )dx+\frac {\sqrt {\pi } \cos (2 a) \operatorname {FresnelS}\left (\frac {2 \sqrt {b} x}{\sqrt {\pi }}\right )}{2 \sqrt {b}}\right )-\frac {\cos ^2\left (a+b x^2\right )}{x}\) |
\(\Big \downarrow \) 3833 |
\(\displaystyle -2 b \left (\frac {\sqrt {\pi } \sin (2 a) \operatorname {FresnelC}\left (\frac {2 \sqrt {b} x}{\sqrt {\pi }}\right )}{2 \sqrt {b}}+\frac {\sqrt {\pi } \cos (2 a) \operatorname {FresnelS}\left (\frac {2 \sqrt {b} x}{\sqrt {\pi }}\right )}{2 \sqrt {b}}\right )-\frac {\cos ^2\left (a+b x^2\right )}{x}\) |
-(Cos[a + b*x^2]^2/x) - 2*b*((Sqrt[Pi]*Cos[2*a]*FresnelS[(2*Sqrt[b]*x)/Sqr t[Pi]])/(2*Sqrt[b]) + (Sqrt[Pi]*FresnelC[(2*Sqrt[b]*x)/Sqrt[Pi]]*Sin[2*a]) /(2*Sqrt[b]))
3.1.13.3.1 Defintions of rubi rules used
Int[Sin[(d_.)*((e_.) + (f_.)*(x_))^2], x_Symbol] :> Simp[(Sqrt[Pi/2]/(f*Rt[ d, 2]))*FresnelS[Sqrt[2/Pi]*Rt[d, 2]*(e + f*x)], x] /; FreeQ[{d, e, f}, x]
Int[Cos[(d_.)*((e_.) + (f_.)*(x_))^2], x_Symbol] :> Simp[(Sqrt[Pi/2]/(f*Rt[ d, 2]))*FresnelC[Sqrt[2/Pi]*Rt[d, 2]*(e + f*x)], x] /; FreeQ[{d, e, f}, x]
Int[Sin[(c_) + (d_.)*((e_.) + (f_.)*(x_))^2], x_Symbol] :> Simp[Sin[c] In t[Cos[d*(e + f*x)^2], x], x] + Simp[Cos[c] Int[Sin[d*(e + f*x)^2], x], x] /; FreeQ[{c, d, e, f}, x]
Int[((a_.) + (b_.)*Sin[u_])^(p_.), x_Symbol] :> Int[(a + b*Sin[ExpandToSum[ u, x]])^p, x] /; FreeQ[{a, b, p}, x] && BinomialQ[u, x] && !BinomialMatchQ [u, x]
Int[Cos[(a_.) + (b_.)*(x_)^(n_)]^(p_)*(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)*(Cos[a + b*x^n]^p/(m + 1)), x] + Simp[b*n*(p/(m + 1)) Int[Cos[a + b*x^ n]^(p - 1)*Sin[a + b*x^n], x], x] /; FreeQ[{a, b}, x] && IGtQ[p, 1] && EqQ[ m + n, 0] && NeQ[n, 1] && IntegerQ[n]
Int[Cos[w_]^(p_.)*(u_.)*Sin[v_]^(p_.), x_Symbol] :> Simp[1/2^p Int[u*Sin[ 2*v]^p, x], x] /; EqQ[w, v] && IntegerQ[p]
Time = 0.40 (sec) , antiderivative size = 62, normalized size of antiderivative = 0.82
method | result | size |
default | \(-\frac {1}{2 x}-\frac {\cos \left (2 b \,x^{2}+2 a \right )}{2 x}-\sqrt {b}\, \sqrt {\pi }\, \left (\cos \left (2 a \right ) \operatorname {S}\left (\frac {2 x \sqrt {b}}{\sqrt {\pi }}\right )+\sin \left (2 a \right ) \operatorname {C}\left (\frac {2 x \sqrt {b}}{\sqrt {\pi }}\right )\right )\) | \(62\) |
risch | \(-\frac {1}{2 x}-\frac {i {\mathrm e}^{-2 i a} b \sqrt {\pi }\, \sqrt {2}\, \operatorname {erf}\left (\sqrt {2}\, \sqrt {i b}\, x \right )}{4 \sqrt {i b}}+\frac {i {\mathrm e}^{2 i a} b \sqrt {\pi }\, \operatorname {erf}\left (\sqrt {-2 i b}\, x \right )}{2 \sqrt {-2 i b}}-\frac {\cos \left (2 b \,x^{2}+2 a \right )}{2 x}\) | \(83\) |
-1/2/x-1/2/x*cos(2*b*x^2+2*a)-b^(1/2)*Pi^(1/2)*(cos(2*a)*FresnelS(2*x*b^(1 /2)/Pi^(1/2))+sin(2*a)*FresnelC(2*x*b^(1/2)/Pi^(1/2)))
Time = 0.27 (sec) , antiderivative size = 66, normalized size of antiderivative = 0.87 \[ \int \frac {\cos ^2\left (a+b x^2\right )}{x^2} \, dx=-\frac {\pi x \sqrt {\frac {b}{\pi }} \cos \left (2 \, a\right ) \operatorname {S}\left (2 \, x \sqrt {\frac {b}{\pi }}\right ) + \pi x \sqrt {\frac {b}{\pi }} \operatorname {C}\left (2 \, x \sqrt {\frac {b}{\pi }}\right ) \sin \left (2 \, a\right ) + \cos \left (b x^{2} + a\right )^{2}}{x} \]
-(pi*x*sqrt(b/pi)*cos(2*a)*fresnel_sin(2*x*sqrt(b/pi)) + pi*x*sqrt(b/pi)*f resnel_cos(2*x*sqrt(b/pi))*sin(2*a) + cos(b*x^2 + a)^2)/x
\[ \int \frac {\cos ^2\left (a+b x^2\right )}{x^2} \, dx=\int \frac {\cos ^{2}{\left (a + b x^{2} \right )}}{x^{2}}\, dx \]
Result contains complex when optimal does not.
Time = 0.63 (sec) , antiderivative size = 83, normalized size of antiderivative = 1.09 \[ \int \frac {\cos ^2\left (a+b x^2\right )}{x^2} \, dx=\frac {\sqrt {2} \sqrt {b x^{2}} {\left ({\left (-\left (i + 1\right ) \, \sqrt {2} \Gamma \left (-\frac {1}{2}, 2 i \, b x^{2}\right ) + \left (i - 1\right ) \, \sqrt {2} \Gamma \left (-\frac {1}{2}, -2 i \, b x^{2}\right )\right )} \cos \left (2 \, a\right ) + {\left (\left (i - 1\right ) \, \sqrt {2} \Gamma \left (-\frac {1}{2}, 2 i \, b x^{2}\right ) - \left (i + 1\right ) \, \sqrt {2} \Gamma \left (-\frac {1}{2}, -2 i \, b x^{2}\right )\right )} \sin \left (2 \, a\right )\right )} - 8}{16 \, x} \]
1/16*(sqrt(2)*sqrt(b*x^2)*((-(I + 1)*sqrt(2)*gamma(-1/2, 2*I*b*x^2) + (I - 1)*sqrt(2)*gamma(-1/2, -2*I*b*x^2))*cos(2*a) + ((I - 1)*sqrt(2)*gamma(-1/ 2, 2*I*b*x^2) - (I + 1)*sqrt(2)*gamma(-1/2, -2*I*b*x^2))*sin(2*a)) - 8)/x
\[ \int \frac {\cos ^2\left (a+b x^2\right )}{x^2} \, dx=\int { \frac {\cos \left (b x^{2} + a\right )^{2}}{x^{2}} \,d x } \]
Timed out. \[ \int \frac {\cos ^2\left (a+b x^2\right )}{x^2} \, dx=\int \frac {{\cos \left (b\,x^2+a\right )}^2}{x^2} \,d x \]